computeIntersection

fun computeIntersection(segment1: Segment2<*>, segment2: Segment2<*>, equivalence: DoubleEquivalence = DEFAULT_DOUBLE_EQUIVALENCE): Vec2(source)

Computes the intersection point of two segments.

Return

The intersection point of the two segments.

Parameters

segment1

The first segment.

segment2

The second segment.

equivalence

The equivalence used to determine whether the lines are parallel. Defaults to DEFAULT_DOUBLE_EQUIVALENCE.

Throws

if the segments do not intersect or are parallel at the given precision.